﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:CBR.Components.Designer">

    <Style TargetType="{x:Type Shape}" x:Key="ThumbCorner">
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="Stroke" Value="LightSlateGray" />
        <Setter Property="StrokeThickness" Value="0.4" />
        <Setter Property="Width" Value="7" />
        <Setter Property="Height" Value="7" />
        <Setter Property="Margin" Value="-2" />
        <Setter Property="Fill">
            <Setter.Value>
                <RadialGradientBrush Center="0.3, 0.3" GradientOrigin="0.3, 0.3"
                                     RadiusX="0.7" RadiusY="0.7">
                    <GradientStop Color="White" Offset="0" />
                    <GradientStop Color="DarkSlateGray" Offset="0.9" />
                </RadialGradientBrush>
            </Setter.Value>
        </Setter>
    </Style>

	<Style TargetType="{x:Type local:ResizeChrome}">
        <Setter Property="Template">
            <Setter.Value>
				<ControlTemplate TargetType="{x:Type local:ResizeChrome}">
                    <Grid>
                        <Grid Opacity="0"
                              Margin="-3">
							<local:ResizeThumb Height="3"
                                           Cursor="SizeNS"
                                           VerticalAlignment="Top"
                                           HorizontalAlignment="Stretch" />
							<local:ResizeThumb Width="3"
                                           Cursor="SizeWE"
                                           VerticalAlignment="Stretch"
                                           HorizontalAlignment="Left" />
							<local:ResizeThumb Width="3"
                                           Cursor="SizeWE"
                                           VerticalAlignment="Stretch"
                                           HorizontalAlignment="Right" />
							<local:ResizeThumb Height="3"
                                           Cursor="SizeNS"
                                           VerticalAlignment="Bottom"
                                           HorizontalAlignment="Stretch" />
							<local:ResizeThumb Width="7"
                                           Height="7"
                                           Margin="-2"
                                           Cursor="SizeNWSE"
                                           VerticalAlignment="Top"
                                           HorizontalAlignment="Left" />
							<local:ResizeThumb Width="7"
                                           Height="7"
                                           Margin="-2"
                                           Cursor="SizeNESW"
                                           VerticalAlignment="Top"
                                           HorizontalAlignment="Right" />
							<local:ResizeThumb Width="7"
                                           Height="7"
                                           Margin="-2"
                                           Cursor="SizeNESW"
                                           VerticalAlignment="Bottom"
                                           HorizontalAlignment="Left" />
							<local:ResizeThumb Width="7"
                                           Height="7"
                                           Margin="-2"
                                           Cursor="SizeNWSE"
                                           VerticalAlignment="Bottom"
                                           HorizontalAlignment="Right" />
                        </Grid>
                        <Grid IsHitTestVisible="False"
                              Opacity="1"
                              Margin="-3">
                            <Rectangle SnapsToDevicePixels="True"
                                       StrokeThickness="2"
                                       Margin="0" Stroke="LightSlateGray"/>
                            <Ellipse Style="{StaticResource ThumbCorner}"
                                     HorizontalAlignment="Left"
                                     VerticalAlignment="Top" />
                            <Ellipse Style="{StaticResource ThumbCorner}"
                                     HorizontalAlignment="Right"
                                     VerticalAlignment="Top" />
                            <Ellipse Style="{StaticResource ThumbCorner}"
                                     HorizontalAlignment="Left"
                                     VerticalAlignment="Bottom" />
                            <Ellipse Style="{StaticResource ThumbCorner}"
                                     HorizontalAlignment="Right"
                                     VerticalAlignment="Bottom" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>